Copy boot drive to new Disk

Shutdown as many services as you can, on the running system

I am using /dev/sdk for the device of the new disk, in these examples.

Mount the new disk to /newboot

cp -axv / /newboot
cp -av /dev /newboot


edit the /newboot/etc/fstab with the new uuid of the new boot disk


Copy the MBR from the old drive to the new.

if=/dev/sda1 of=/dev/sdk1 bs=512 count=1

Install grub on the drive

grub-install --root-directory=/newboot /dev/sdk


Check the /boot/grub/grub.cfg file and make sure the UUID of the new partition is correct. If it is not replace it with the UUID of the new boot disk.

blog comments powered by Disqus